package com.example.book.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author 凡哥哥
 * @since 2023-10-01
 */
@Data
@TableName("book")
@Builder
@ApiModel("图书实体类")
public class Book implements Serializable {
    @Tolerate
    public Book() {

    }

    private static final long serialVersionUID = 1L;

    /**
     * "图书ID"
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("图书ID")
    private Long id;
    /**
     * "图书名称"
     */
    @ApiModelProperty("图书名称")
    private String name;
    /**
     * 图书类型
     */
    @ApiModelProperty("图书类型")
    private int type;
    /**
     * "创建时间"
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    /**
     * "修改时间"
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;
    /**
     * "图片"
     */
    @ApiModelProperty("图片")
    private String image;
    /**
     * "作者"
     */
    @ApiModelProperty("作者")
    private String author;
    /**
     * "文章简介"
     */
    @ApiModelProperty("文章简介")
    private String brief;
    /**
     * "0 违法下架 1正常"
     */
    @ApiModelProperty("0 违法下架 1正常")
    private Boolean status;
    /**
     * "图书名称"
     */
    @ApiModelProperty("图书名称")
    @TableField(exist = false)
    private String typeName;
    /**
     * "0 删除 1正常"
     */
    @ApiModelProperty("0 删除 1正常")
    private Boolean isDelete;
    /**
     * 连载/完结
     */
    @ApiModelProperty("连载/完结")
    private String message;
    /**
     * 作者id
     */
    @ApiModelProperty("作者id")
    private Long authorId;
}
